package st.yushao.restaurant.action.custom;

import java.util.List;

import st.yushao.restaurant.dao.TableDaoService;
import st.yushao.restaurant.fw.AbstractBaseAction;
import st.yushao.restaurant.vo.TableVO;

public class GetTableList extends AbstractBaseAction {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 4157148690411608526L;
    private TableDaoService ts;
    private List<TableVO> tables;

    public void setTs(TableDaoService ts) {
        this.ts = ts;
    }

    public List<TableVO> getTables() {
        return tables;
    }

    public String doExecute() {
        int restId = getRestId();
        this.tables = ts.getTablesByRestId(restId);
        return SUCCESS;
    }
}
